<template>
	<view class="wrap">
		<view class="items">
			<view class="li" v-for="(item,index) in list" :key="index">
				<view class="count">
					<view class="img">
						<image src="../../../../static/uview/common/华慧阁.png" mode="widthFix"></image>
					</view>
					<view class="iteminfo">
						<view>
							<span>姓名：</span> {{item.name}}
						</view>
						<view>
							<span>逝世日期：</span>  {{item.dietime}}
						</view>
						<view>
							<span>下葬日期：</span>  {{item.addboxtime}}
						</view>
						<view>
							<span>所在馆区：</span>  {{item.address}}
						</view>
					</view>
				</view>
				<view class="btns">
					<view class="btn" @click="goToPage('祭奠亲友')" >
						祭奠亲友
					</view>
					<view class="btn"  @click="goToPage('代客祭扫')">
						代客祭扫
					</view>
				</view>
			</view>
		</view>
		<view class="footerbtn">
			<button type="default" size="mini" @click="tofullscreen('添加亲友')">添加亲友</button>
			<button type="default" size="mini" @click="tofullscreen('墓位绑定')">墓位绑定</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[{
					name:'郝宇佳',
					dietime:'2021-10-24',
					addboxtime:'2021-11-24',
					address:'青龙镇盘古存A区卧虎路'
				},{
					name:'郝宇佳1',
					dietime:'',
					addboxtime:'',
					address:''
				},
				]
			}
		},
		methods: {
			goToPage(name){
				if(name == '祭奠亲友'){ // 跳转 祭奠亲友页面
					console.log('祭奠亲友')
				}
				else if(name == '代客祭扫'){ // 跳转 代客祭扫页面
					this.$u.route({
						url:'/pages/view/fuzepark/hold/valet/valet'
					})
				}
			},
			
			tofullscreen(name){
				if(name == '添加亲友'){ // 跳转 添加亲友页面
					this.$u.route({
						url:'/pages/view/fuzepark/hold/addperson/addperson'
					})
				}
				else if(name == '墓位绑定'){ // 跳转 墓位绑定页面
					this.$u.route({
						url:'/pages/view/tombBinding/tombBinding'
					})
				}
				// this.$u.route("pages/view/diyfullscreen/diyfullscreen")
			}
		}
	}
</script>

<style scoped lang="less">
.count{
	overflow: hidden;
	padding:30upx;
	.img{
		width: 30%;
		float: left;
		image{
			width: 100%;
		}
	}
	.iteminfo{
		width: 70%;
		float: left;
		line-height: 45upx;
		padding-left: 20upx;
		view{
			white-space: nowrap;
			span{
				font-weight: bold;
			}
		}
	}
	
}
.btns{
	width: 100%;
	text-align: center;
	.btn{
		display: inline-block;
		margin-left: 25upx;
		padding:14upx 24upx;
		border-radius: 15upx;
		border: 2px solid rgb(230,230,230);
	}
}
.li{
	border-bottom: 1px solid rgb(230,230,230);
	padding-bottom: 60upx;
}
.footerbtn{
	text-align: center;
	padding: 30upx;
	button{
		margin-left: 30upx;
	}
}
</style>
